﻿<ribbon:RibbonTab x:Class="OpenRm.Server.Gui.Modules.Monitor.Views.AgentsRibbonTabView"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                  xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
                  xmlns:Converters="clr-namespace:OpenRm.Server.Gui.Modules.Monitor.Converters"
                  mc:Ignorable="d" 
                  Header="Agents">

    <ribbon:RibbonGroup Header="Connection">
        <ribbon:RibbonButton LargeImageSource="Images\ConnectionManager_48x48.png"  Label="Connect"
                             Command="{Binding ConnectCommand}" x:Name="ConnectButton"
                             IsEnabled="{Binding IsConnectEnabled, Mode=OneWay}"/>
        <ribbon:RibbonButton LargeImageSource="Images\RefreshArrow_32x32.png" Label="Refresh Agents" 
                             Command="{Binding RefreshAgentsCommand}"
                             IsEnabled="{Binding IsConnectEnabled, 
                                        Converter={x:Static Converters:StaticConverters.InvertBoolConverter}}"/>
    </ribbon:RibbonGroup>
    
    <ribbon:RibbonGroup Header="Commands">
        <ribbon:RibbonButton LargeImageSource="Images\software_64x64.png"  
                             Label="Installed Programs"
                             Command="{Binding InstalledProgramsCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
        <ribbon:RibbonButton LargeImageSource="Images\Lock_32x32.png" Label="Lock Session" 
                             Command="{Binding LockSessionCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
        <ribbon:RibbonButton LargeImageSource="Images\Restart_32x32.png" Label="Restart" 
                             Command="{Binding RestartCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
        <ribbon:RibbonButton LargeImageSource="Images\Shutdown_32x32.png" Label="Shut Down" 
                             Command="{Binding ShutDownCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
        <ribbon:RibbonButton LargeImageSource="Images\RemoteControl_32x32.png" Label="Remote Control" 
                             Command="{Binding RemoteControlCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
        <ribbon:RibbonButton LargeImageSource="Images\Run_48x48.png" Label="Run Process" 
                             Command="{Binding RunProcessCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
        <ribbon:RibbonButton LargeImageSource="Images\wol_64x64.png" Label="Wake on Lan" 
                             Command="{Binding WakeOnLanCommand}"
                             IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanInverseConverter}}"/>
    </ribbon:RibbonGroup>

    <ribbon:RibbonGroup Header="Network Utilities">
        <!--Converter={x:Static Converters:StaticConverters.DummyValueConverter}-->
        <ribbon:RibbonTextBox Text="{Binding Path=CommonCommandParameter, Mode=TwoWay, 
                                      TargetNullValue='', FallbackValue='', 
                                      UpdateSourceTrigger=PropertyChanged}"
                              TextBoxWidth="90"/>
        <!--<TextBox Text="{Binding CommonCommandParameter, Mode=TwoWay, TargetNullValue='', FallbackValue=''}" d:DataContext="{d:DesignInstance Type=ViewModels:AgentsRibbonTabViewModel}" 
                 AcceptsReturn="True" AcceptsTab="True"/>-->
        <ribbon:RibbonComboBox IsEditable="True">
            <ribbon:RibbonGallery SelectedValue="{Binding Path=SelectedComboBoxValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        SelectedValuePath="Content"
                        MaxColumnCount="1">
                <ribbon:RibbonGalleryCategory>
                    <ribbon:RibbonGalleryItem Content="Ping"/>
                    <ribbon:RibbonGalleryItem Content="TraceRoute"/>
                </ribbon:RibbonGalleryCategory>
            </ribbon:RibbonGallery>
        </ribbon:RibbonComboBox>
        <ribbon:RibbonButton LargeImageSource="Images\Browser_64x64.png"  Label="Execute"
                            Command="{Binding CommonCommand}"
                            IsEnabled="{Binding CurrentEntity, 
                                        Converter={x:Static Converters:StaticConverters.InstanceToBooleanConverter}}"/>
    </ribbon:RibbonGroup>
    
</ribbon:RibbonTab >
